<template>
  <span class="breadcrumb-separator">
    <span v-if="hasSeparator">{{separator}}</span>
    <slot v-else></slot>
  </span>
</template>
<script>
export default {
  data() {
    return {
      separator: '/',
      hasSeparator: false
    }
  },
  mounted() {
    if (!this.$slots.default) {
      this.hasSeparator = true
    }
  }
}
</script>
<style lang="less" scoped>
  @import './index.less';
</style>